package com.ihisomp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ihisomp.base.Result;
import com.ihisomp.dto.SysDeptFunctionDto;
import com.ihisomp.entity.SysDeptFunction;
import com.ihisomp.mapper.SysDeptFunctionMapper;
import com.ihisomp.service.ISysDeptFunctionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 * 科室职能信息 服务实现类
 * </p>
 *
 * @author zy
 * @since 2022-04-06
 */
@Service
public class SysDeptFunctionServiceImpl extends ServiceImpl<SysDeptFunctionMapper, SysDeptFunction> implements ISysDeptFunctionService {

    /**
     * 科室职能列表
     *
     * @param sysDeptFunctionDto
     * @return
     */
    @Override
    public Result list(SysDeptFunctionDto sysDeptFunctionDto) {
        if (sysDeptFunctionDto == null) {
            sysDeptFunctionDto = new SysDeptFunctionDto();
        }
        QueryWrapper<SysDeptFunction> queryWrapper = new QueryWrapper();
        queryWrapper.orderByAsc("seq_no");
        List<SysDeptFunction> list = baseMapper.selectList(queryWrapper);
        return Result.ok(list);
    }
}
